package org.example.est.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * model
 * @author 
 */
@Data
public class Model implements Serializable {
    private Long id;

    /**
     * 型号名称
     */
    private String modelname;

    /**
     * 品牌id
     */
    private Long brandid;

    /**
     * 类型id
     */
    private Long classifyid;

    /**
     * 当前行情价格
     */
    private BigDecimal exchangeprice;

    /**
     * 最高价
     */
    private BigDecimal topprice;

    /**
     * 封面图片
     */
    private String faceimg;

    /**
     * 内容图片
     */
    private String contentimg;

    /**
     * 描述
     */
    private String description;

    /**
     * 状态（0:下架,1:上架）
     */
    private Integer status;

    /**
     * 创建人
     */
    private Long createduserid;

    /**
     * 修改人
     */
    private Long updateduserid;

    /**
     * 创建时间
     */
    private Date createdtime;

    /**
     * 修改时间
     */
    private Date updatedtime;

    /**
     * 是否删除(0:否,1:是)
     */
    private Integer isdelete;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Model other = (Model) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getModelname() == null ? other.getModelname() == null : this.getModelname().equals(other.getModelname()))
            && (this.getBrandid() == null ? other.getBrandid() == null : this.getBrandid().equals(other.getBrandid()))
            && (this.getClassifyid() == null ? other.getClassifyid() == null : this.getClassifyid().equals(other.getClassifyid()))
            && (this.getExchangeprice() == null ? other.getExchangeprice() == null : this.getExchangeprice().equals(other.getExchangeprice()))
            && (this.getTopprice() == null ? other.getTopprice() == null : this.getTopprice().equals(other.getTopprice()))
            && (this.getFaceimg() == null ? other.getFaceimg() == null : this.getFaceimg().equals(other.getFaceimg()))
            && (this.getContentimg() == null ? other.getContentimg() == null : this.getContentimg().equals(other.getContentimg()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateduserid() == null ? other.getCreateduserid() == null : this.getCreateduserid().equals(other.getCreateduserid()))
            && (this.getUpdateduserid() == null ? other.getUpdateduserid() == null : this.getUpdateduserid().equals(other.getUpdateduserid()))
            && (this.getCreatedtime() == null ? other.getCreatedtime() == null : this.getCreatedtime().equals(other.getCreatedtime()))
            && (this.getUpdatedtime() == null ? other.getUpdatedtime() == null : this.getUpdatedtime().equals(other.getUpdatedtime()))
            && (this.getIsdelete() == null ? other.getIsdelete() == null : this.getIsdelete().equals(other.getIsdelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getModelname() == null) ? 0 : getModelname().hashCode());
        result = prime * result + ((getBrandid() == null) ? 0 : getBrandid().hashCode());
        result = prime * result + ((getClassifyid() == null) ? 0 : getClassifyid().hashCode());
        result = prime * result + ((getExchangeprice() == null) ? 0 : getExchangeprice().hashCode());
        result = prime * result + ((getTopprice() == null) ? 0 : getTopprice().hashCode());
        result = prime * result + ((getFaceimg() == null) ? 0 : getFaceimg().hashCode());
        result = prime * result + ((getContentimg() == null) ? 0 : getContentimg().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateduserid() == null) ? 0 : getCreateduserid().hashCode());
        result = prime * result + ((getUpdateduserid() == null) ? 0 : getUpdateduserid().hashCode());
        result = prime * result + ((getCreatedtime() == null) ? 0 : getCreatedtime().hashCode());
        result = prime * result + ((getUpdatedtime() == null) ? 0 : getUpdatedtime().hashCode());
        result = prime * result + ((getIsdelete() == null) ? 0 : getIsdelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", modelname=").append(modelname);
        sb.append(", brandid=").append(brandid);
        sb.append(", classifyid=").append(classifyid);
        sb.append(", exchangeprice=").append(exchangeprice);
        sb.append(", topprice=").append(topprice);
        sb.append(", faceimg=").append(faceimg);
        sb.append(", contentimg=").append(contentimg);
        sb.append(", description=").append(description);
        sb.append(", status=").append(status);
        sb.append(", createduserid=").append(createduserid);
        sb.append(", updateduserid=").append(updateduserid);
        sb.append(", createdtime=").append(createdtime);
        sb.append(", updatedtime=").append(updatedtime);
        sb.append(", isdelete=").append(isdelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}